package com.soup.lab.executor.pool;

import java.util.List;
import java.util.Map;
import java.util.concurrent.*;

public class ExecuteOnceThreadPoolExecutor extends AbstractExecutorService {

    private AbstractExecutorService delegateExecutorService;

    private Map<String /* key */, Future<?>> runningTaskCache;


    public ExecuteOnceThreadPoolExecutor(AbstractExecutorService executorService) {
        this.delegateExecutorService = executorService;
    }

    @Override
    public void execute(Runnable command) {

    }

    @Override
    protected <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value) {



        return super.newTaskFor(runnable, value);
    }

    @Override
    protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable) {
        return super.newTaskFor(callable);
    }

    @Override
    public void shutdown() {
        delegateExecutorService.shutdown();
    }

    @Override
    public List<Runnable> shutdownNow() {
        return delegateExecutorService.shutdownNow();
    }

    @Override
    public boolean isShutdown() {
        return delegateExecutorService.isShutdown();
    }

    @Override
    public boolean isTerminated() {
        return delegateExecutorService.isTerminated();
    }

    @Override
    public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {
        return delegateExecutorService.awaitTermination(timeout, unit);
    }

}
